package itheima.zuoye.test5;

public class Teacher extends  Person {
    private String subject;


    public Teacher() {
    }

    public Teacher(String subject) {
        this.subject = subject;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public void shangke() {
        System.out.println("老师：" + getName() + "，年龄：" + getAge() + "，科目：" + subject);
    }

}

